package com.todolist.client.service;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.todolist.shared.domain.Task;

import java.util.ArrayList;

public interface TaskServiceAsync {

    void getTask(String text, AsyncCallback<Task> async);

    void addTask(Integer projectId, String text, Integer priority, AsyncCallback<Void> async);

    void updateTaskText(String oldText, String newText, AsyncCallback<Void> async);

    void updateTaskCompleteness(String text, Boolean completed, AsyncCallback<Void> async);

    void updateTaskPriority(String text, Integer priority, AsyncCallback<Void> async);

    void deleteTask(Integer projectId, String text, AsyncCallback<Void> async);

    void deleteTasks(Integer projectId, AsyncCallback<Void> async);

    void getTasks(Integer projectId, AsyncCallback<ArrayList<Task>> async);

    void getMaxTaskPriority(AsyncCallback<Integer> async);
}
